package com.xiaoxing.salesclient.di.module;

import com.jess.arms.di.scope.FragmentScope;

import dagger.Module;
import dagger.Provides;

import com.xiaoxing.salesclient.mvp.contract.JiFenShangChengTabContract;
import com.xiaoxing.salesclient.mvp.model.JiFenShangChengTabModel;


@Module
public class JiFenShangChengTabModule {
    private JiFenShangChengTabContract.View view;

    /**
     * 构建JiFenShangChengTabModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public JiFenShangChengTabModule(JiFenShangChengTabContract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    JiFenShangChengTabContract.View provideJiFenShangChengTabView() {
        return this.view;
    }

    @FragmentScope
    @Provides
    JiFenShangChengTabContract.Model provideJiFenShangChengTabModel(JiFenShangChengTabModel model) {
        return model;
    }
}